package com.lfy.modules.letter.domain.builder;

import lombok.AllArgsConstructor;
import lombok.Getter;


public interface LetterEnum {
    @AllArgsConstructor
    @Getter
     enum LetterType{
        SYS_SEND(0,"系统消息"),
        SITE_SEND(1,"站长通知"),
        ;
        final Integer code;
        final String msg;
    }
    @AllArgsConstructor
    @Getter
     enum ReadType{
        READ(1,"已读"),
        UN_READ(0,"未读"),
        ;
        final Integer code;
        final String msg;
    }
    @AllArgsConstructor
    @Getter
     enum SendEmailType{
        YES(1,"发送邮件"),
        NO(0,"不发送"),
        ;
        final Integer code;
        final String msg;
    }
    @AllArgsConstructor
    @Getter
    enum SysSubjectType {
        COMMENT_EVENT {
            @Override
            public String getSubject(String title) {
                return "你的文章《" + title + "》有新评论";
            }
        },
        DELETE_ARTICLE_EVENT {
            @Override
            public String getSubject(String title) {
                return "你的文章《" + title + "》已被站长删除";
            }
        },
        CUSTOM_EVENT {
            @Override
            public String getSubject(String title) {
                return title;
            }
        },
        ROLE_CHANGE_EVENT {
            @Override
            public String getSubject (String title){
                return "你的身份已被修改";
            }
        },
        DISK_EVENT {
            @Override
            public String getSubject(String title) {
                return "云盘事件";
            }
        },

        ;
       public abstract String getSubject(String title);
    }


}
